<%= page_title "Kubernetes Deploy Group Role" %>

<section class="form-horizontal">
  <div class="form-group">
    <label class="col-lg-2 control-label">Role</label>
    <div class="col-lg-4">
      <p class="form-control-static"><%= link_to @deploy_group_role.kubernetes_role.name, [@deploy_group_role.project, @deploy_group_role.kubernetes_role] %></p>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">Project</label>
    <div class="col-lg-4">
      <p class="form-control-static"><%= link_to @deploy_group_role.project.name, project_path(@deploy_group_role.project) %></p>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">Deploy Group</label>
    <div class="col-lg-4">
      <p class="form-control-static"><%= link_to @deploy_group_role.deploy_group.name, deploy_group_path(@deploy_group_role.deploy_group) %></p>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">Replicas</label>
    <div class="col-lg-4">
      <p class="form-control-static"><%= @deploy_group_role.replicas %></p>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">CPU</label>
    <div class="col-lg-4">
      <p class="form-control-static"><%= @deploy_group_role.requests_cpu %> to <%= @deploy_group_role.limits_cpu %></p>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 control-label">Memory Request</label>
    <div class="col-lg-4">
      <p class="form-control-static"><%= @deploy_group_role.requests_memory %> to <%= @deploy_group_role.limits_memory %> MB</p>
    </div>
  </div>

  <div class="form-group">
    <div class="col-lg-offset-2 col-lg-10">
      <% if current_user.admin_for?(@deploy_group_role.project) %>
        <%= link_to "Edit", edit_kubernetes_deploy_group_role_path(@deploy_group_role), class: "btn btn-primary" %>
      <% end %>
      <%= link_to "Back", kubernetes_deploy_group_roles_path, class: "btn btn-default" %>
    </div>
  </div>
</section>
